package com.itheima.service;

import com.itheima.pojo.Student;
import com.sun.xml.internal.ws.api.pipe.ClientTubeAssemblerContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AppForDIAutoware {
    public static void main(String[] args) {
        //创建IOc容器对象
        ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        //依赖注入
        Student student = classPathXmlApplicationContext.getBean("student", Student.class);
        //查询元素是否添加成功
        System.out.println(student);


    }
}
